home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / JAVA Utilities / JShift Component Conversion Utility v0.4 / CCU.JAR / javax / servlet / jsp / resources / jspxml.xsd < prev    next >
Encoding:
Extensible Markup Language  |  2001-03-31  |  15.4 KB  |  391 lines

  1. <?xml version ="1.0"?>
  2. <!DOCTYPE schema [
  3. <!-- Patterns -->
  4. <!ENTITY Identifier     "(\p{L}|_|$)(\p{N}|\p{L}|_|$)*">
  5. <!ENTITY TypeName       "&Identifier;(\.&Identifier;)*">
  6. <!ENTITY WS             "\s*">
  7. <!ENTITY Import         "&TypeName;(\.\*)?">
  8. <!ENTITY ImportList     "&Import;(&WS;,&WS;&Import;)*">
  9. <!ENTITY SetProp        "(&Identifier;|\*)">
  10. <!ENTITY RelativeURL    "[^:#/\?]*(:{0,0}|[#/\?].*)">
  11. <!ENTITY Length         "[0-9]*%?">
  12. <!ENTITY AsciiName      "[A-Za-z0-9_-]*">
  13. <!ENTITY ContentType    "&AsciiName;/&AsciiName;(;&WS;(encoding=)?&AsciiName;)?">
  14. <!ENTITY Buffer         "[0-9]+kb">
  15. ]>
  16.  
  17. <!--MISSING jsp:cdata & jsp:attribute -->
  18. <!--Conforms to w3c http://www.w3.org/1999/XMLSchema draft of 7 April 2000-->
  19.  
  20. <schema xmlns = "http://www.w3.org/1999/XMLSchema"
  21.         xmlns:jsp = "http://java.sun.com/jsp_1_2"
  22.         targetNamespace = "http://java.sun.com/xschema/jsp_1_2.xsd"
  23.         elementFormDefault = "qualified"
  24.         attributeFormDefault = "unqualified">
  25.  
  26.     <annotation>
  27.         <documentation>
  28.             XML Schema for JSP 1.2.
  29.             Contributed 00/7/22 Bob Foster, WebGain.
  30.             
  31.             Note: All patterns tested with ActiveState Perl
  32.             5.6.0.616-MSWin32. (\p{L}|_) form is used instead
  33.             of equivalent [\p{L}_] because when tested \p{L}
  34.             didn't work inside []. Tested patterns were
  35.             copied to schema eliminating ^ and $ at start
  36.             and end and replacing \$ with $.
  37.  
  38.             Suggested status of schema:
  39.             
  40.             This schema is based upon the 7 April 2000 final draft of the
  41.             w3c XMLSchema working group (http://www.w3.org/XML/Schema).
  42.             XMLSchema is still a work in progress and the schema may
  43.             need to be updated to reflect later versions.
  44.             
  45.             A JSP translator should reject an XML-format file that is
  46.             not strictly valid according to this schema or does not observe
  47.             the constraints documented here. A translator is not required
  48.             to use this schema for validation, to use a validating parser
  49.             or even to be namespace-aware.
  50.         </documentation>
  51.     </annotation>
  52.  
  53.     <complexType name = "Body" content = "mixed">
  54.         <annotation>
  55.             <documentation>
  56.                 Body defines the "top-level" elements in root and beanInfo.
  57.             </documentation>
  58.         </annotation>
  59.         <group ref = "Bodygroup" minOccurs = "0" maxOccurs = "unbounded"/>
  60.     </complexType>
  61.  
  62.     <group name = "Bodygroup">
  63.         <choice>
  64.             <element ref = "directive.page"/>
  65.             <element ref = "directive.include"/>
  66.             <element ref = "directive.taglib"/>
  67.             <element ref = "scriptlet"/>
  68.             <element ref = "declaration"/>
  69.             <element ref = "expression"/>
  70.             <element ref = "useBean"/>
  71.             <element ref = "setProperty"/>
  72.             <element ref = "getProperty"/>
  73.             <element ref = "include"/>
  74.             <element ref = "forward"/>
  75.             <element ref = "plugin"/>
  76.         </choice>
  77.     </group>
  78.  
  79.     <simpleType name = "Bool" base = "NMTOKEN">
  80.         <annotation>
  81.             <documentation>
  82.                 Bool would be boolean except it does not accept 1 and 0.
  83.             </documentation>
  84.         </annotation>
  85.         <enumeration value = "true"/>
  86.         <enumeration value = "false"/>
  87.         <enumeration value = "yes"/>
  88.         <enumeration value = "no"/>
  89.     </simpleType>
  90.  
  91.     <simpleType name = "Identifier" base = "string">
  92.         <annotation>
  93.             <documentation>
  94.                 Identifier is an unqualified Java identifier.
  95.             </documentation>
  96.         </annotation>
  97.         <pattern value = "&Identifier;"/>
  98.     </simpleType>
  99.     
  100.     <simpleType name = "TypeName" base = "string">
  101.         <annotation>
  102.             <documentation>
  103.                 TypeName is one or more Java identifiers separated by dots
  104.                 with no whitespace.
  105.             </documentation>
  106.         </annotation>
  107.         <pattern value = "&TypeName;"/>
  108.     </simpleType>
  109.     
  110.     <simpleType name = "ImportList" base = "string">
  111.         <annotation>
  112.             <documentation>
  113.                 ImportList is one or more typeNames separated by commas.
  114.                 Whitespace is allowed before and after the comma.
  115.             </documentation>
  116.         </annotation>
  117.         <pattern value = "&ImportList;"/>
  118.     </simpleType>
  119.     
  120.     <simpleType name = "SetProp" base = "string">
  121.         <annotation>
  122.             <documentation>
  123.                 SetProp is an Identifier or *.
  124.             </documentation>
  125.         </annotation>
  126.         <pattern value = "&SetProp;"/>
  127.     </simpleType>
  128.     
  129.     <simpleType name = "RelativeURL" base = "uriReference">
  130.         <annotation>
  131.             <documentation>
  132.                 RelativeURL is a uriReference with no colon character
  133.                 before the first /, ? or #, if any (RFC2396).
  134.             </documentation>
  135.         </annotation>
  136.         <pattern value = "&RelativeURL;"/>
  137.     </simpleType>
  138.  
  139.     <simpleType name = "Length" base = "string">
  140.         <annotation>
  141.             <documentation>
  142.                 Length is nn or nn%.
  143.             </documentation>
  144.         </annotation>
  145.         <pattern value = "&Length;"/>
  146.     </simpleType>
  147.     
  148.     <element name = "root" type = "Body">
  149.         <annotation>
  150.             <documentation>
  151.                 The root element of all JSP documents is named root.
  152.                 
  153.                 In a document, root must be used as:
  154.                 
  155.                     <jsp:root xmlns:jsp="jsp-1.2-schema-namespace-identifier">
  156.                     ...
  157.                     </jsp:root>
  158.                 
  159.                 In other words, the namespace prefix "jsp:" must be explicitly
  160.                 specified for all JSP-defined elements. This allows both
  161.                 Schema-validating parsers and parsers that are not
  162.                 namespace-aware to operate properly.
  163.  
  164.                 Authors may, if they wish, include schema location information.
  165.                 If specified, the information may appear as attributes of
  166.                 the root element as follows:
  167.  
  168.                     xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
  169.                     xsi:schemaLocation="jsp-1.2-schema-namespace-identifier
  170.                                         jsp-1.2-schema-xsd-file-location"
  171.  
  172.                 Documents that are intended to be schema-valid should not
  173.                 specify the system identifier of a DTD in a DOCTYPE declaration.
  174.                 (The JSP DTD exports no general entities and is not conditional
  175.                 on any parameter entities.)
  176.             </documentation>
  177.         </annotation>
  178.     </element>
  179.     
  180.     <element name = "directive.page">
  181.         <annotation>
  182.             <documentation>
  183.                 directive.page is the "page directive".
  184.             </documentation>
  185.         </annotation>
  186.         <complexType content = "empty">
  187.             <attribute name = "language" use = "default" value = "java" type = "string"/>
  188.             <attribute name = "extends" type = "TypeName"/>
  189.             <attribute name = "contentType" use = "default" value = "text/html; ISO-8859-1">
  190.                 <simpleType base = "string">
  191.                     <pattern value = "&ContentType;"/>
  192.                 </simpleType>
  193.             </attribute>
  194.             <attribute name = "import" type = "ImportList"/>
  195.             <attribute name = "session" use = "default" value = "true" type = "Bool"/>
  196.             <attribute name = "buffer" use = "default" value = "8kb">
  197.                 <simpleType base = "string">
  198.                     <pattern value = "&Buffer;"/>
  199.                 </simpleType>
  200.             </attribute>
  201.             <attribute name = "autoFlush" use = "default" value = "true" type = "Bool"/>
  202.             <attribute name = "isThreadSafe" use = "default" value = "true" type = "Bool"/>
  203.             <attribute name = "info" type = "string"/>
  204.             <attribute name = "errorPage" type = "RelativeURL"/>
  205.         </complexType>
  206.     </element>
  207.     
  208.     <element name = "directive.include">
  209.         <annotation>
  210.             <documentation>
  211.                 directive.include is the "include directive".
  212.             </documentation>
  213.         </annotation>
  214.         <complexType content = "empty">
  215.             <attribute name = "file" use = "required" type = "RelativeURL"/>
  216.         </complexType>
  217.     </element>
  218.     
  219.     <element name = "directive.taglib">
  220.         <annotation>
  221.             <documentation>
  222.                 directive.taglib is the "taglib directive".
  223.                 
  224.                 In a tag library tag, xmlns must be specified as:
  225.                 
  226.                     <tagPrefix:tagname xmlns:tagPrefix="uri" ...>
  227.                 
  228.                 where tagPrefix and uri are as specified in a taglib directive.
  229.                 This allows both Schema-validating parsers and parsers that are not
  230.                 namespace-aware to operate properly.
  231.  
  232.                 Note: The xmlns attribute must be omitted in a .jsp-format
  233.                 JSP file. The .jsp-to-XML translator will supply it.
  234.                 
  235.                 Constraint: A given tagPrefix must be used with the same uri
  236.                 throughout the document.
  237.             </documentation>
  238.         </annotation>
  239.         <complexType content = "empty">
  240.             <attribute name = "uri" use = "required" type = "uriReference"/>
  241.             <attribute name = "tagPrefix" use = "required" type = "NCName"/>
  242.         </complexType>
  243.     </element>
  244.     
  245.     <element name = "scriptlet" type = "string"/>
  246.     
  247.     <element name = "declaration" type = "string"/>
  248.     
  249.     <element name = "expression" type = "string"/>
  250.     
  251.     <element name = "useBean">
  252.         <annotation>
  253.             <documentation>
  254.                 useBean instantiates or accesses a bean in the specified scope.
  255.                 
  256.                 Constraint: The allowed combinations of attributes are:
  257.                 
  258.                     class [type] | type [( class | beanName)]
  259.                 
  260.             </documentation>
  261.         </annotation>
  262.         <complexType base = "Body" derivedBy = "extension">
  263.             <attribute name = "id" use = "required" type = "Identifier"/>
  264.             <attribute name = "class" type = "TypeName"/>
  265.             <attribute name = "type" type = "TypeName"/>
  266.             <attribute name = "beanName" type = "TypeName"/>
  267.             <attribute name = "scope" use = "default" value = "page">
  268.                 <simpleType base = "NMTOKEN">
  269.                     <enumeration value = "page"/>
  270.                     <enumeration value = "session"/>
  271.                     <enumeration value = "request"/>
  272.                     <enumeration value = "application"/>
  273.                 </simpleType>
  274.             </attribute>
  275.         </complexType>
  276.     </element>
  277.     
  278.     <element name = "setProperty">
  279.         <annotation>
  280.             <documentation>
  281.                 setProperty changes the value of an object property.
  282.                 
  283.                 Constraint: The object named by the name must have been
  284.                 "introduced" to the JSP processor using either the
  285.                 jsp:useBean action or a custom action with an associated
  286.                 VariableInfo entry for this name.
  287.                                 
  288.                 ???The spec is interpreted as restricting the values of
  289.                 property to (Identifier | '*').
  290.                 
  291.                 Constraint: The allowed combinations of attributes are:
  292.                                 
  293.                     (property="*" | property="^*" (value | param))
  294.                 
  295.             </documentation>
  296.         </annotation>
  297.         <complexType content = "empty">
  298.             <attribute name = "name" use = "required" type = "Identifier"/>
  299.             <attribute name = "property" use = "required" type = "SetProp"/>
  300.             <attribute name = "value" type = "string"/>
  301.             <attribute name = "param" type = "string"/>
  302.         </complexType>
  303.     </element>
  304.     
  305.     <element name = "getProperty">
  306.         <annotation>
  307.             <documentation>
  308.                 getProperty obtains the value of an object property.
  309.                 
  310.                 Constraint: The object named by the name must have been
  311.                 "introduced" to the JSP processor using either the
  312.                 jsp:useBean action or a custom action with an associated
  313.                 VariableInfo entry for this name.
  314.                 
  315.                 ???The spec is interpreted as restricting the values of
  316.                 property to Identifier.
  317.             </documentation>
  318.         </annotation>
  319.         <complexType content = "empty">
  320.             <attribute name = "name" use = "required" type = "Identifier"/>
  321.             <attribute name = "property" use = "required" type = "Identifier"/>
  322.         </complexType>
  323.     </element>
  324.     
  325.     <element name = "include">
  326.         <complexType content = "elementOnly">
  327.             <element ref = "param" minOccurs = "0" maxOccurs = "unbounded"/>
  328.             <attribute name = "flush" use = "default" value = "false" type = "Bool"/>
  329.             <attribute name = "page" use = "required" type = "RelativeURL"/>
  330.         </complexType>
  331.     </element>
  332.     
  333.     <element name = "forward">
  334.         <complexType content = "elementOnly">
  335.             <element ref = "param" minOccurs = "0" maxOccurs = "unbounded"/>
  336.             <attribute name = "page" use = "required" type = "RelativeURL"/>
  337.         </complexType>
  338.     </element>
  339.     
  340.     <element name = "plugin">
  341.         <complexType content = "elementOnly">
  342.             <sequence>
  343.                 <element ref = "params" minOccurs = "0" maxOccurs = "1"/>
  344.                 <element name = "fallback" minOccurs = "0" maxOccurs = "1"/>
  345.             </sequence>
  346.             <attribute name = "type" use = "required">
  347.                 <simpleType base = "NMTOKEN">
  348.                     <enumeration value = "bean"/>
  349.                     <enumeration value = "applet"/>
  350.                 </simpleType>
  351.             </attribute>
  352.             <attribute name = "code" type = "uriReference"/>
  353.             <attribute name = "codebase" type = "uriReference"/>
  354.             <attribute name = "align">
  355.                 <simpleType base = "NMTOKEN">
  356.                     <enumeration value = "top"/>
  357.                     <enumeration value = "middle"/>
  358.                     <enumeration value = "bottom"/>
  359.                     <enumeration value = "left"/>
  360.                     <enumeration value = "right"/>
  361.                 </simpleType>
  362.             </attribute>
  363.             <attribute name = "archive">
  364.                 <simpleType base = "uriReference" derivedBy = "list"/>
  365.             </attribute>
  366.             <attribute name = "height" type = "Length"/>
  367.             <attribute name = "hspace" type = "int"/>
  368.             <attribute name = "jreversion" use = "default" value = "1.2" type = "string"/>
  369.             <attribute name = "name" type = "NMTOKEN"/>
  370.             <attribute name = "vspace" type = "int"/>
  371.             <attribute name = "width" type = "Length"/>
  372.             <attribute name = "nspluginurl" type = "uriReference"/>
  373.             <attribute name = "iepluginurl" type = "uriReference"/>
  374.         </complexType>
  375.     </element>
  376.     
  377.     <element name = "params">
  378.         <complexType content = "elementOnly">
  379.             <element ref = "param" minOccurs = "1" maxOccurs = "unbounded"/>
  380.         </complexType>
  381.     </element>
  382.     
  383.     <element name = "param">
  384.         <complexType content = "empty">
  385.             <attribute name = "name" use = "required" type = "NMTOKEN"/>
  386.             <attribute name = "value" use = "required" type = "string"/>
  387.         </complexType>
  388.     </element>
  389.     
  390. </schema>
  391.